package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.service.AgencyCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description AgencyCertificationAuditController
 * @Author luohai
 * @Date 2024-12-03
 */
@RestController("AgencyCertificationAuditController1")
@RequestMapping("/operation/agency-certification-audit")
@Api(tags = "运营端 - 机构认证信息相关接口")
public class AgencyCertificationAuditController {

    @Autowired
    private AgencyCertificationAuditService agencyCertificationAuditService;
    /**
     * 审核机构认证分页查询
     * @return
     */
    @GetMapping("/page")
    @ApiOperation("审核机构认证分页查询")
    public PageResult<AgencyCertificationAuditResDTO> pageQuery(AgencyCertificationAuditPageQueryReqDTO dto){
        return agencyCertificationAuditService.pageQuery(dto);
    }

    /**
     * 审核机构认证信息
     * @param id
     * @param certificationStatus
     * @param rejectReason
     */
    @PutMapping("/audit/{id}")
    @ApiOperation("审核机构认证信息")
    public void audit(@PathVariable Long id, Integer certificationStatus, String rejectReason){
        agencyCertificationAuditService.audit(id,certificationStatus,rejectReason);
    }
}
